
const formLists = ['bd_psndoc', 'hi_psnjob_h', 'hi_psnorg_h'];

export default function() {

    const {addPageTemplate, selectedRows} = this.state;

    const {
        button,
        cardTable,
        form
    } = this.props;

    // 让所有表单回到浏览状态
    formLists.map((item) => {
        form.setFormStatus(item, 'browse');
    });

    // 所有表格变回预览态
    addPageTemplate.areaCodeList.map((item) => {
        if(!formLists.includes(item)) {
            cardTable.setStatus(item, 'browse');
        }
    });

    // 隐藏保存和取消按钮，显示编辑按钮
    if(selectedRows[0].data.values['pk_psndoc.ishiskeypsn'].value) {
        this.setButtonStatus2();
    }
    else {
        this.setButtonStatus2('addEditPageBrowser');
    }
    // 隐藏子表的操作按钮
    this.setState({
        subTableEditable: false,
        disableUpload: true
    });
}
